% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils_names_whichlist.R
\name{names_whichlist}
\alias{names_whichlist}
\title{See which of the lists of names a single term appears in}
\usage{
names_whichlist(
  x,
  exact = T,
  grepmatching = T,
  ignore.case.exact = FALSE,
  ignore.case.grep = FALSE,
  keylists = F,
  exactonly = FALSE
)
}
\arguments{
\item{x}{term, like part or all of a variable name, such as state.avg}

\item{exact}{whether to look for exact matches}

\item{grepmatching}{whether to look for matches via grep (partial match)}

\item{ignore.case.exact}{whether to ignore capitalization in exact matches}

\item{ignore.case.grep}{passed to grep as ignore.case param}

\item{keylists}{if true, only report for the key lists not friendly, all, these, need types.}

\item{exactonly}{to limit output to rows with exact matches}
}
\value{
a data.frame of whichlist, exactmatch, grepmatch, and grephits (examples)
}
\description{
See which of the lists of names a single term appears in
}
\details{
EJAM::namez has a list of lists of names used for indicators or variables, such as
namez$d_subgroups_state_pctile which is a vector of terms like
"state.pctile.pcthisp", "state.pctile.pctnhba", etc.
}
\examples{
 
   x <- names_whichlist("rsei", ignore.case.exact = T, ignore.case.grep = T)
   subset(x, !grepl("friendly", x$whichlist))
   
   subset(x,  grepl("friendly", x$whichlist))
   subset(namez, names(namez) != "all_r" & names(namez) \%in\%
      subset(x, x$grepmatch == "yes" & !grepl("friendly", x$whichlist))$whichlist  )
   grep("\\\\.eo$", namez$ej, value = T)

}
\seealso{
\code{\link[=varinfo]{varinfo()}}
}
\keyword{internal}
